import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '姓名',
    align: "center",
    dataIndex: 'name'
  },
  {
    title: '性别',
    align: "center",
    dataIndex: 'sex'
  },
  {
    title: '部门名称',
    align: "center",
    dataIndex: 'sysOrgName_dictText'
  },
  {
    title: '职位',
    align: "center",
    dataIndex: 'positionId'
  },
  {
    title: '电话',
    align: "center",
    dataIndex: 'phone'
  },
  {
    title: '工号',
    align: "center",
    dataIndex: 'workNo'
  },
  {
    title: '入职时间',
    align: "center",
    dataIndex: 'createTime',
    customRender:({text}) =>{
      text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
      return text;
    },
  },
  {
    title: '离职时间',
    align: "center",
    dataIndex: 'departTime',
    customRender:({text}) =>{
      text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
      return text;
    },
  },
];

// 高级查询数据
export const superQuerySchema = {
  name: {title: '姓名',order: 0,view: 'text', type: 'string',},
  sex: {title: '性别',order: 1,view: 'text', type: 'string',},
  sysOrgName: {title: '部门名称',order: 2,view: 'text', type: 'string',},
  positionId: {title: '职位',order: 3,view: 'text', type: 'string',},
  phone: {title: '电话',order: 4,view: 'text', type: 'string',},
  workNo: {title: '工号',order: 5,view: 'text', type: 'string',},
  createTime: {title: '入职时间',order: 6,view: 'date', type: 'string',},
  departTime: {title: '离职时间',order: 7,view: 'date', type: 'string',},
};
